
/*
 * GET detail page.
 */

var noteDao = require("../dao/noteDao");
 
exports.index = function(req, res){
  console.log("note_id:"+ req.params.id);
  var noteId = req.params.id;
  noteDao.findByNodeId(noteId, function(err, noteItems){
	if(err){
		console.log(err);
	}
	else{
		console.log(noteItems);
		res.render('detail', {title:'DocManage', note: noteItems[0]});
	}
  });
}